// 商户接口
import request from '@/utils/request'

// 商户列表
export function getSystemAgentList(params: any) {
  return request({
    url: '/v1/admin/system/agentList',
    method: 'get',
    params: params
  })
}

// 商户列表新增
export function postSystemaddAgent(data: any) {
  return request({
    url: '/v1/admin/system/addAgent',
    method: 'post',
    data: data
  })
}

// 商户列表更新
export function putSystemChangeAgent(data: any) {
  return request({
    url: '/v1/admin/system/changeAgent',
    method: 'put',
    data: data
  })
}

// 商户列表-开启关闭API
export function putChangeAgentStatus(data: any) {
  return request({
    url: '/v1/admin/system/ChangeAgentStatus',
    method: 'put',
    data: data
  })
}

// 商户列表删除
export function delSystemDestroyAgent(data: any) {
  return request({
    url: '/v1/admin/system/destroyAgent',
    method: 'delete',
    data: data
  })
}

// 商户币种
export function getAllCurrencyList(params: any) {
  return request({
    url: '/v1/admin/system/allCurrencyList',
    method: 'get',
    params: params
  })
}

// 生成秘钥秘钥
export function postSystemFandKey(data: any) {
  return request({
    url: '/v1/admin/system/randKey',
    method: 'post',
    data: data
  })
}

// 总代管理列表
export function getSystemOperatorList(params: any) {
  return request({
    url: '/v1/admin/system/operatorList',
    method: 'get',
    params: params
  })
}

// 总代管理-新增
export function postSystemAddOperator(data: any) {
  return request({
    url: '/v1/admin/system/addOperator',
    method: 'post',
    data: data
  })
}

// 总代管理-修改
export function putSystemChangeOperator(data: any) {
  return request({
    url: '/v1/admin/system/changeOperator',
    method: 'put',
    data: data
  })
}

// 总代管理-删除
export function delSystemDestroyOperator(data: any) {
  return request({
    url: '/v1/admin/system/destroyOperator',
    method: 'delete',
    data: data
  })
}

// 总代列表-开启关闭API
export function editGeneralStatus(data: any) {
  return request({
    url: '/v1/admin/system/changeOperatorStatus',
    method: 'put',
    data: data
  })
}

// 商户登录日志
export function getAgentLoginLogList(params: any) {
  return request({
    url: '/v1/admin/system/agentLoginLogList',
    method: 'get',
    params: params
  })
}
// 商户行为日志
export function getAgentActionLogList(params: any) {
  return request({
    url: '/v1/admin/system/agentActionLogList',
    method: 'get',
    params: params
  })
}

// 谷歌验证码
export function googleKey(params: any) {
  return request({
    url: '/v1/admin/system/getGoogleCodeUrl',
    method: 'get',
    params: params
  })
}

// 批量开启关闭商户API-获取商户
export function getAgentApiList(params: any) {
  return request({
    url: '/v1/admin/system/getCanChangeAgent',
    method: 'get',
    params: params
  })
}
// 批量开启关闭商户API
export function editAgentApi(data: any) {
  return request({
    url: '/v1/admin/system/changeMoreAgentStatus',
    method: 'put',
    data: data
  })
}